package com.yufa.springcloud.feign;

import feign.hystrix.FallbackFactory;
import org.springframework.web.multipart.MultipartFile;

import java.util.List;


public class FeignClient01Hystrix implements FallbackFactory<FeignClient01> {

    @Override
    public FeignClient01 create(Throwable cause) {
        return new FeignClient01() {
            @Override
            public List<String> upload(MultipartFile file) {
                cause.printStackTrace();
                return null;
            }
        };
    }
}
